#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 100010;
typedef pair<int, int> PII;
int n, a[N], presum;
vector<int> v;
map<int, int> mp;
signed main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i ++ ) cin >> a[i], mp[a[i]] ++ ;
    for (auto i : mp) v.push_back(i.second);
    int res = n;
    presum = v[0] ;
    for (int i = 1; i < v.size(); i ++ )
    {
        int ab_eat = min(presum, v[i]);
        presum -= ab_eat;
        res -= ab_eat;
        presum += v[i];
    }
    cout << res;
    return 0;
}
